home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / LOC / ZLOCCOUN.C < prev    next >
Text File  |  1991-11-20  |  4KB  |  140 lines

  1. /* zLOCCounter.c -- window methods */
  2. /* Created 10/17/91 4:10 PM by AppMaker */
  3.  
  4. /*    We recommend that you not modify this module and instead modify        */
  5. /*    its subclass, LOCCounter.  The 'z' prefix on this module marks        */
  6. /*    a module which is likely to be regenerated by AppMaker after you    */
  7. /*    make changes to the user interface.  The modules without the 'z'    */
  8. /*    prefix will not be regenerated by AppMaker unless you delete them.    */
  9. /*    Using a separate subclass to override the AppMaker-generated code    */
  10. /*    lets you regenerate code without losing your hand-coded changes.    */ 
  11.  
  12. #include <Commands.h>
  13. #include <Constants.h>
  14. #include <Global.h>
  15. #include <CDecorator.h>
  16. #include <CDesktop.h>
  17. #include <CError.h>
  18. #include <CRadioGroup.h>
  19. #include <CSizeBox.h>
  20. #include <TBUtilities.h>
  21. #include "zLOCCounter.h"
  22.  
  23. #define    LOCCounterID    1        /* resource ID for WIND template */
  24.  
  25. extern    CDecorator        *gDecorator;    /* Window dressing object    */
  26. extern    CDesktop        *gDesktop;        /* The enclosure for all windows */
  27. extern    CError            *gError;        /* The error handling object */
  28. extern    CBureaucrat        *gGopher;        /* The current boss in the chain of command */
  29.  
  30. /*----------*/
  31. void    ZLOCCounter::ILOCCounter    (CDirector    *aSupervisor)
  32. {
  33.     CView            *enclosure;
  34.     CBureaucrat        *supervisor;
  35.     CSizeBox        *aSizeBox;
  36.     CRadioGroup        *aGroup;
  37.     CRadioButton    *theDisabledRadio;
  38.  
  39.     IWindow (LOCCounterID, FALSE, gDesktop, aSupervisor);
  40.     itsMainPane = new (CPane);
  41.     itsMainPane->IPane ( this, this, 1, 1, 0, 0, sizFIXEDLEFT, sizFIXEDTOP );
  42.     itsMainPane->FitToEnclosure ( true, true );
  43.  
  44.     itsGopher = aSupervisor;
  45.     
  46.     SourceLinesLabel = new (CLabelText);
  47.     SourceLinesLabel->IViewRes ('LbTx', 129, itsMainPane, itsMainPane);
  48.     
  49.     SemicolonsLabel = new (CLabelText);
  50.     SemicolonsLabel->IViewRes ('LbTx', 130, itsMainPane, itsMainPane);
  51.     
  52.     FilesLabel = new (CLabelText);
  53.     FilesLabel->IViewRes ('LbTx', 132, itsMainPane, itsMainPane);
  54.     
  55.     numLOCNowLabel = new (CLabelText);
  56.     numLOCNowLabel->IViewRes ('LbTx', 133, itsMainPane, itsMainPane);
  57.     
  58.     numSemicolonsNowLabel = new (CLabelText);
  59.     numSemicolonsNowLabel->IViewRes ('LbTx', 134, itsMainPane, itsMainPane);
  60.     
  61.     numClassesNowLabel = new (CLabelText);
  62.     numClassesNowLabel->IViewRes ('LbTx', 136, itsMainPane, itsMainPane);
  63.     
  64.     CurrentLabel = new (CLabelText);
  65.     CurrentLabel->IViewRes ('LbTx', 138, itsMainPane, itsMainPane);
  66.     
  67.     PreviousLabel = new (CLabelText);
  68.     PreviousLabel->IViewRes ('LbTx', 139, itsMainPane, itsMainPane);
  69.     
  70.     numLOCPrevLabel = new (CLabelText);
  71.     numLOCPrevLabel->IViewRes ('LbTx', 140, itsMainPane, itsMainPane);
  72.     
  73.     numSemicolonsPrevLabel = new (CLabelText);
  74.     numSemicolonsPrevLabel->IViewRes ('LbTx', 141, itsMainPane, itsMainPane);
  75.     
  76.     numClassesPrevLabel = new (CLabelText);
  77.     numClassesPrevLabel->IViewRes ('LbTx', 143, itsMainPane, itsMainPane);
  78.     
  79.     Rect12 = new (CBorder);
  80.     Rect12->IViewRes ('Bord', 129, itsMainPane, itsMainPane);
  81.     
  82.     Rect13 = new (CBorder);
  83.     Rect13->IViewRes ('Bord', 130, itsMainPane, itsMainPane);
  84.     
  85.     Rect14 = new (CBorder);
  86.     Rect14->IViewRes ('Bord', 132, itsMainPane, itsMainPane);
  87.     
  88.     Rect15 = new (CBorder);
  89.     Rect15->IViewRes ('Bord', 133, itsMainPane, itsMainPane);
  90.     
  91.     Rect16 = new (CBorder);
  92.     Rect16->IViewRes ('Bord', 134, itsMainPane, itsMainPane);
  93.     
  94.     Rect17 = new (CBorder);
  95.     Rect17->IViewRes ('Bord', 136, itsMainPane, itsMainPane);
  96.     
  97.     DeltaLabel = new (CLabelText);
  98.     DeltaLabel->IViewRes ('LbTx', 149, itsMainPane, itsMainPane);
  99.     
  100.     numLOCDeltaLabel = new (CLabelText);
  101.     numLOCDeltaLabel->IViewRes ('LbTx', 150, itsMainPane, itsMainPane);
  102.     
  103.     numSemicolonsDeltaLabel = new (CLabelText);
  104.     numSemicolonsDeltaLabel->IViewRes ('LbTx', 151, itsMainPane, itsMainPane);
  105.     
  106.     numClassesDeltaLabel = new (CLabelText);
  107.     numClassesDeltaLabel->IViewRes ('LbTx', 153, itsMainPane, itsMainPane);
  108.     
  109.     Rect22 = new (CBorder);
  110.     Rect22->IViewRes ('Bord', 141, itsMainPane, itsMainPane);
  111.     
  112.     Rect23 = new (CBorder);
  113.     Rect23->IViewRes ('Bord', 142, itsMainPane, itsMainPane);
  114.     
  115.     Rect24 = new (CBorder);
  116.     Rect24->IViewRes ('Bord', 144, itsMainPane, itsMainPane);
  117.         
  118. } /* ILOCCounter */
  119.  
  120. /*----------*/
  121. void ZLOCCounter::Activate        (void)
  122. {
  123.     inherited::Activate ();
  124.     gGopher = itsGopher;
  125.  
  126. } /* Activate */
  127.  
  128. /*----------*/
  129. void ZLOCCounter::DoCommand        (long        theCommand)
  130. {
  131.     switch (theCommand) {
  132.         default:
  133.                 inherited::DoCommand (theCommand);
  134.             break;
  135.     } /* switch */
  136.  
  137. } /* DoCommand */
  138.  
  139. /* zLOCCounter.c */
  140.